<template>
  <div class="page-footer">
    <div class="footer">
      <div class="tab-list">
        <div
          v-for="(item, index) in tabList"
          :key="index"
          class="tab-item"
          @click="tbnFn(item)"
        >
          <img :src="item.imgUrl" alt="" />
          {{ item.title }}
        </div>
      </div>
    </div>
    <div class="footer-info">
      <div style="margin-right: 55px">
        <img src="@img/home/圣诺莉官网—首页_01-03.png" alt="" />
      </div>
      <div class="phone">
        <img src="@img/footer-phone.png" alt="" />
        18721665379
      </div>
      <div class="city">
        圣诺莉婚礼艺术中心（浦东店）：上海市浦东新区上后路35B00号
      </div>
    </div>
  </div>
</template>

<script>
import imgUrl1 from "@img/home/圣诺莉官网—首页_01-92.png";
import imgUrl2 from "@img/home/圣诺莉官网—首页_01-83.png";
import imgUrl3 from "@img/home/圣诺莉官网—首页_01-86.png";
import imgUrl4 from "@img/home/圣诺莉官网—首页_01-89.png";
import imgUrl5 from "@img/home/圣诺莉官网—首页_01-81.png";

export default {
  data() {
    return {
      tabList: [
        {
          title: "在线咨询",
          icon: "",
          imgUrl: imgUrl1,
        },
        {
          title: "预约看店",
          icon: "",
          imgUrl: imgUrl5,
        },
        {
          title: "咨询档期",
          icon: "",
          imgUrl: imgUrl2,
        },
        {
          title: "发送地址",
          icon: "",
          imgUrl: imgUrl3,
        },
        {
          title: "返回顶部",
          icon: "",
          imgUrl: imgUrl4,
        },
      ],
    };
  },
  methods: {
    tbnFn(item) {
      if (item.title == "返回顶部") {
        document.documentElement.scrollTop = 0;
      }
    },
  },
};
</script>

<style lang="less">
@import url("@css/index.less");
.page-footer {
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  max-width: 1920px;
  min-width: 1024px;
  .footer {
    width: 100%;
    background: @backBg;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    .tab-list {
      display: flex;
      align-items: center;
      font-size: 20px;
      font-weight: 800;
      color: #fff;
      .tab-item {
        border-right: 1px solid #fff;
        padding: 0 10px;
        display: flex;
        align-items: center;
        img {
          margin-right: 5px;
        }
      }
      .tab-item:last-child {
        border: none;
      }
    }
  }
  .footer-info {
    background: #f1f1f3;
    color: #9d9d9d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    width: 100%;

    .phone {
      color: #9d9d9d;
      font-size: 30px;
      margin-right: 20px;

      img {
        width: 50px;
        height: 50px;
        margin-right: 10px;
      }
    }
    .city {
      font-size: 20px;
    }
  }
}
</style>
